package com.awangyh.jdk8.util;

import java.util.Optional;

/**
 * @author: wangyanhui
 * @since: 2017/5/4
 */
public class OptionalUtil {
    public static void main(String[] args) throws Exception {
        String charsetName = null;

        System.out.println(Optional.<String>of(charsetName).orElse("utf-8"));


    }
}
